package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Strategy;
import cn.wolfcode.wolf2w.domain.Travel;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface TravelRepository extends MongoRepository<Travel,String> {

    /**
     * 通过当前登录用户的id查询出当前用户所写的游记
     * @param id
     * @return
     */
    List<Travel> queryByUserId(String id);

    /**
     * 通过目的地名称查询出所对应的游记
     * @param destName
     * @return
     */
    List<Travel> queryByDestName(String destName);
}
